package com.hmy.common.exception;

public enum ResultEnum implements IResultEnum {
    SUCCEED(200, "success"),
    ERROR(-1, "error"),
    SERVER_ERROR(500, "服务器异常，请稍后再试"),
    UNAUTHORIZED(401, "需要进行身份认证"),
    FORBIDDEN(403, "禁止访问")
    ;

    private final int code;
    private final String msg;

    ResultEnum(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    @Override
    public int getCode() {
        return this.code;
    }

    @Override
    public String getMsg() {
        return this.msg;
    }
}
